package dungeonElements;

import dungeonTools.Direction;
import be.kuleuven.cs.som.annotate.*;

/**
 * A class of walls. Each wall describes a wall between two squares. A wall 
 * can have a slippery surface.
 * 
 * @author Tom Jacobs & Ewoud De Moor
 * @version 3.0
 */
public class Wall extends Border{
	
	/**
	 * Initialize this new wall with the given square as bordering square 
	 * in the given direction and whether or not with a slippery surface.
	 * 
	 * @param square
	 * 		The bordering square of this border.
	 * @param direction
	 * 		The direction of bordering square.
	 * @param hasSlipperySurface
	 * 		Determines whether the border has a slippery surface.
	 * @effect This new wall is initialized as a border with the given square and 
	 * 		the given direction. 
	 * 		| super(square, direction)
	 */
	@Raw
	public Wall(Square square, Direction direction, boolean hasSlipperySurface)	{
		super(square, direction);
		slipperySurface = hasSlipperySurface;
	}

	/**
	 * Returns whether or not the surface of the Wall is 
	 * inherently slippery (made of a slippery material)
	 */
	@Basic
	public boolean hasSlipperySurface() {
		return slipperySurface;
	}
	
	/**
	 * Variable registering whether or not the wall has a slippery surface.
	 */
	private final boolean slipperySurface;

	/**
	 * Returns true because a wall is always an obstacle.
	 * @return Always true.
	 * 		| result == true
	 */
	@Override @Immutable
	public boolean isObstacle() {
		return true;
	}
}
